home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / ahmstanc / _setup.1 / AHMTExplorerTree.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-12-05  |  6.0 KB  |  163 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'AHMTExplorerTree.pas' rev: 3.00
  6.  
  7. #ifndef AHMTExplorerTreeHPP
  8. #define AHMTExplorerTreeHPP
  9. #include <Menus.hpp>
  10. #include <Graphics.hpp>
  11. #include <Forms.hpp>
  12. #include <ShellAPI.hpp>
  13. #include <AHMSControls.hpp>
  14. #include <ComCtrls.hpp>
  15. #include <Controls.hpp>
  16. #include <Classes.hpp>
  17. #include <SysUtils.hpp>
  18. #include <Messages.hpp>
  19. #include <Windows.hpp>
  20. #include <SysInit.hpp>
  21. #include <System.hpp>
  22.  
  23. //-- user supplied -----------------------------------------------------------
  24.  
  25. namespace Ahmtexplorertree
  26. {
  27. //-- type declarations -------------------------------------------------------
  28. typedef void __fastcall (__closure *TAHMAddFileEvent)(System::TObject* Sender, System::AnsiString FileName
  29.     , bool &DoAdd);
  30.  
  31. typedef void __fastcall (__closure *TAHMFindDirectoryEvent)(System::TObject* Sender, System::AnsiString 
  32.     Path, int &Result, const bool First);
  33.  
  34. typedef System::AnsiString AHMTExplorerTree__2[26];
  35.  
  36. class DELPHICLASS TAHMExplorerTree;
  37. class PASCALIMPLEMENTATION TAHMExplorerTree : public Comctrls::TCustomTreeView 
  38. {
  39.     typedef Comctrls::TCustomTreeView inherited;
  40.     
  41. private:
  42.     Ahmscontrols::TAHMAboutSControlStr FAboutStr;
  43.     bool fFastLoad;
  44.     Controls::TImageList* fIList;
  45.     System::AnsiString fActDirs[26];
  46.     TAHMAddFileEvent FOnAddDirectory;
  47.     Comctrls::TTVExpandedEvent FOnDeleteDirectory;
  48.     Comctrls::TTVExpandedEvent FOnGetIcon;
  49.     TAHMFindDirectoryEvent FOnFindDirectory;
  50.     int fIFolS;
  51.     int fIFolN;
  52.     bool fAllowChange;
  53.     bool FNetwork;
  54.     System::AnsiString fWinDir;
  55.     void __fastcall DelItem(System::TObject* Sender, Comctrls::TTreeNode* Node);
  56.     
  57. protected:
  58.     virtual void __fastcall CreateWnd(void);
  59.     void __fastcall ReadNew(void);
  60.     void __fastcall AddNode(Comctrls::TTreeNode* &Item, System::AnsiString A);
  61.     void __fastcall GetSubKids(Comctrls::TTreeNode* Par);
  62.     void __fastcall SetDrive(char Val);
  63.     void __fastcall SetDirectory(System::AnsiString Val);
  64.     DYNAMIC void __fastcall Change(Comctrls::TTreeNode* Node);
  65.     void __fastcall SetNetAllow(bool Val);
  66.     void __fastcall ClearList(void);
  67.     virtual void __fastcall Loaded(void);
  68.     void __fastcall TreeGetImageIndex(Comctrls::TTreeNode* Node, int NormalIcon);
  69.     DYNAMIC bool __fastcall CanExpand(Comctrls::TTreeNode* Node);
  70.     System::AnsiString __fastcall GetDirectory(void);
  71.     char __fastcall GetDrive(void);
  72.     Comctrls::TTreeNode* __fastcall AddKid(Comctrls::TTreeNode* Par, System::AnsiString A);
  73.     System::AnsiString __fastcall GetDragDropFolder(void);
  74.     bool __fastcall AskAdd(System::AnsiString FNam);
  75.     bool __fastcall IsExpanded(Comctrls::TTreeNode* Item);
  76.     __property Items  = {stored=false};
  77.     void __fastcall GetBtn(Comctrls::TTreeNode* &Item);
  78.     void __fastcall GetDirChildren(Comctrls::TTreeNode* &Item);
  79.     
  80. public:
  81.     __fastcall virtual TAHMExplorerTree(Classes::TComponent* AOwner);
  82.     __fastcall virtual ~TAHMExplorerTree(void);
  83.     void __fastcall Reload(void);
  84.     HIDESBASE void __fastcall FullExpand(void);
  85.     void __fastcall RenamePath(System::AnsiString OldPath, System::AnsiString NewName);
  86.     void __fastcall DeletePath(System::AnsiString DPath);
  87.     void __fastcall AddPath(System::AnsiString NewPath, System::AnsiString NewSub);
  88.     void __fastcall ClearNode(Comctrls::TTreeNode* Node);
  89.     Comctrls::TTreeNode* __fastcall GetNodeFromPath(System::AnsiString Path);
  90.     __property char Drive = {read=GetDrive, write=SetDrive, nodefault};
  91.     __property System::AnsiString DragDropFolder = {read=GetDragDropFolder};
  92.     __property Controls::TImageList* ShellIcons = {read=fIList};
  93.     
  94. __published:
  95.     __property Ahmscontrols::TAHMAboutSControlStr About = {read=FAboutStr, write=FAboutStr};
  96.     __property System::AnsiString Directory = {read=GetDirectory, write=SetDirectory};
  97.     __property TAHMAddFileEvent OnAddDirectory = {read=FOnAddDirectory, write=FOnAddDirectory};
  98.     __property Comctrls::TTVExpandedEvent OnDeleteItem = {read=FOnDeleteDirectory, write=FOnDeleteDirectory
  99.         };
  100.     __property Comctrls::TTVExpandedEvent OnGetIcon = {read=FOnGetIcon, write=FOnGetIcon};
  101.     __property TAHMFindDirectoryEvent OnFindDirectory = {read=FOnFindDirectory, write=FOnFindDirectory}
  102.         ;
  103.     __property BorderStyle ;
  104.     __property DragCursor ;
  105.     __property bool Network = {read=FNetwork, write=SetNetAllow, nodefault};
  106.     __property bool FastLoad = {read=fFastLoad, write=fFastLoad, nodefault};
  107.     __property ReadOnly ;
  108.     __property DragMode ;
  109.     __property HideSelection ;
  110.     __property OnEditing ;
  111.     __property OnEdited ;
  112.     __property OnExpanding ;
  113.     __property OnExpanded ;
  114.     __property OnCollapsing ;
  115.     __property OnCollapsed ;
  116.     __property OnChanging ;
  117.     __property OnChange ;
  118.     __property Align ;
  119.     __property Enabled ;
  120.     __property Font ;
  121.     __property Color ;
  122.     __property ParentColor ;
  123.     __property ParentCtl3D ;
  124.     __property Ctl3D ;
  125.     __property TabOrder ;
  126.     __property TabStop ;
  127.     __property Visible ;
  128.     __property OnClick ;
  129.     __property OnEnter ;
  130.     __property OnExit ;
  131.     __property OnDragDrop ;
  132.     __property OnDragOver ;
  133.     __property OnStartDrag ;
  134.     __property OnEndDrag ;
  135.     __property OnMouseDown ;
  136.     __property OnMouseMove ;
  137.     __property OnMouseUp ;
  138.     __property OnDblClick ;
  139.     __property OnKeyDown ;
  140.     __property OnKeyPress ;
  141.     __property OnKeyUp ;
  142.     __property PopupMenu ;
  143.     __property ParentFont ;
  144.     __property ParentShowHint ;
  145.     __property ShowHint ;
  146. public:
  147.     /* TWinControl.CreateParented */ __fastcall TAHMExplorerTree(HWND ParentWindow) : Comctrls::TCustomTreeView(
  148.         ParentWindow) { }
  149.     
  150. };
  151.  
  152. //-- var, const, procedure ---------------------------------------------------
  153. extern PACKAGE System::AnsiString __fastcall AHMGetSystemPath(System::AnsiString Path);
  154. extern PACKAGE System::AnsiString __fastcall AHMGetShellPath(System::AnsiString Path);
  155. extern PACKAGE bool __fastcall AHMShellItemExists(System::AnsiString Path);
  156.  
  157. }    /* namespace Ahmtexplorertree */
  158. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  159. using namespace Ahmtexplorertree;
  160. #endif
  161. //-- end unit ----------------------------------------------------------------
  162. #endif    // AHMTExplorerTree
  163.